<template>
	<view class="page">
		<view class='messageList'>
		  <block v-for="(item) in myMessageList" :key="item.ID">
		    <view class='messageName'>{{ item.Name }}</view>
		    <view class='messageContent'>{{ item.Content }}</view>
		    <view class='messagehr'></view>
		  </block>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				myMessageList:[],
			}
		},
		onLoad() {
			this.getMyMessage()
		},
		onPullDownRefresh() {
			this.getMyMessage()
		},
		methods: {
			getMyMessage(){
				this.$api.getMyMessage({openid: getApp().globalData.openid}).then(res => {
					console.log(res)
					this.myMessageList = res.data.XTList
				})
			}
		}
	}
</script>

<style scoped>
@import url('myMessage.css');
</style>
